package com.xiaotu.factory.absfactory.pizzastore.order;

import com.xiaotu.factory.absfactory.pizzastore.pizza.LDCheesePizza;
import com.xiaotu.factory.absfactory.pizzastore.pizza.LDPepperPizza;
import com.xiaotu.factory.absfactory.pizzastore.pizza.Pizza;

/**
 * 这是工厂子类
 * @author 张晓
 * @create 2020-06-19 16:13
 */
public class LDFactory implements AbsFactory{
    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("~~使用的是抽象工厂模式~~");
        if (orderType.equals("cheese")){
            return new LDCheesePizza();
        }else if (orderType.equals("pepper")){
            return new LDPepperPizza();
        }
        return null;
    }
}
